package com.server.impl;

import com.dao.user.UserMapper;
import com.pojo.Member;
import com.pojo.Product;
import com.server.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    UserMapper userMapper;


    @Override
    public Member selectMemberById(int member_id) {
        return userMapper.selectMemberById(member_id);
    }

    @Override
    public int updateUser(int member_id,String member_name,String member_nickname,String member_gender,String member_phone,String member_email){
        return userMapper.updateUser(member_id, member_name, member_nickname, member_gender, member_phone, member_email);
    }

    @Override
    public List<Member> finduser(String username){return userMapper.finduser(username);}
    /*public int updateUser(int member_id){
        return userMapper.updateUser(member_id);
    }*/

    @Override
    public int delUser(int member_id) {
        return userMapper.delUser(member_id);
    }

    @Override
    public List<Member> getUser() {
        return userMapper.getUser();
    }
}
